{include file="common/head"}
<head>
  <title>{$sys.sys_name}</title>
  <style type="text/css">
      html{}
      .row{border-bottom: 1px solid #ccc;padding: 5px;line-height: 26px;--bs-gutter-x: 0;}
      .col-4{text-align: right;}
      #bottom{background: #f60;}
      a{color: #fff;}
      .btn{border: 1px solid #fff;margin: 4px 0;border-radius: 16px;}
      #about div{margin: 10px 0;border-top: 1px solid #ccc;}
  </style>
</head>

<body style="background: #fff; max-width: 800px;">
  <div class="row text-center" style="background: #f90;"  >
        <div style="padding:10px;text-align:center;">
          <a href="/index.php/customer/aboutme/profile/1">
            <img src ="/upload/logo.png" style="width:80px;height: 80px;border:1px solid #f00;border-radius: 50%;padding:10px;" />
          </a>
        </div>
        <div>Hello,{$data.name}</div>
        <div>账户余额：{$data.money}</div>
  </div>

    <div class="container-fluid" >


      <div class="row">
        <div class="col-8">账单:</div>
        <div class="col-4"><span class="bi-chevron-right" id="acc_log"></span></div>
      </div>

      <div class="row">
        <div class="col-8">积分:【{$data.cost}】</div>
        <div class="col-4"><span class="bi-chevron-right" id="cost_log"></span></div>
      </div>

      <div class="row">
        <div class="col-8">优惠劵:</div>
        <div class="col-4"><span class="bi-chevron-rightx"></span></div>
      </div>

      <div class="row">
        <div class="col-8">客服帮助:</div>
        <div class="col-4"><span class="bi-chevron-right" id="kf_help"></span></div>
      </div>

      <div class="row">
        <div class="col-8">关于bigLaLa:</div>
        <div class="col-4"><span class="bi-chevron-right" id="about_us"></span></div>
      </div>

      <div class="row" style="padding: 20px;border:0;">
        <button type="button" id="logout" class="form-control btn btn-primary">退出账户(Logout)</button>
        <button type="button" id="charge" class="form-control btn btn-warning">充值</button>
        <button type="button" id="get_money" class="form-control btn btn-secondary">提现</button>
      </div>

      <input type="hidden" id="about_msg" value="{$sys.about_msg}"/>
      <div id="about" style="display: none;position: fixed;top:10px;left:10px;right:10px;bottom: 60px;border:1px solid #555;background: #fff;box-shadow: 0px 0 2px #555; border-radius: 10px;padding: 10px;">
        
      </div>



  <!-- 底部栏 -->
  {include file="common/bottom"}
    </div>

<script type="text/javascript">
$(document).ready(function(){
  $("#about").html($("#about_msg").val());

  $("#bottom #to_me").css({'background':"#f90"});  

  $("#logout").on('click',function(e){
    layer.confirm('Are you sure?',
      {title:'Confrim',btn:['Yes','No']},
      function(){
      location.href="/index.php/customer/logout";
    },function(){
      layer.msg('Cancel!');
    })
  })
  
$("#charge").on('click',function(){
  location.href="/index.php/customer/charge/type/1";
})
$("#get_money").on('click',function(){
  location.href="/index.php/customer/charge/type/4";
})

$("#acc_log").on('click',function(){
  location.href="/index.php/customer/acc_log/view/_mobile";
})
$("#kf_help").on('click',function(){
  location.href="/index.php/msg/msg/kf/kf";
})
$("#cost_log").on('click',function(){
  location.href="/index.php/customer/cost_list";
})
$("#about_us").on('click',function(){
  $("#about").fadeIn();
})
$("#about").on('click',function(){
  $("#about").fadeOut(200);
})


  $("#save").on('click',function(){
      var id=$("#id").val();
      var password = $("#password").val();
      if(!password) return false;

      //询问框
      layer.confirm('Are you sure?', {btn: ['Yes','No'],title:'Confirm' }, function(){
        $('form').submit();

        $.ajax({
          url:'/index.php/customer/aboutme',
          data:{'id':id,'password':password},
          success:function(res){
            //var res = JSON.parse(res);
            console.log(res.msg);
            layer.msg(res.msg);

          }
        })
      }, function(){
        layer.msg("Cancel!");
        return 0;
      });

  })

})


</script>


</body>
</html>
